import { Controller } from 'egg';

export default class UserController extends Controller {
  public async login() {
    const { ctx } = this;
    let user = ctx.request.body
    ctx.body = await ctx.service.user.login(user);
  }
  public async register() {
    const { ctx } = this;
    let user = ctx.request.body
    ctx.body = await ctx.service.user.register(user);
  }
}
